# $Id$
# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>

pkgname=ocl-icd
pkgver=2.2.11
_pkgver=814
pkgrel=1
pkgdesc="OpenCL ICD Bindings"
arch=('i686' 'x86_64')
url="https://forge.imag.fr/projects/ocl-icd/"
license=('BSD')
depends=('glibc')
makedepends=('ruby' 'mesa' 'opencl-headers>=2.1')
checkdepends=()
provides=('opencl-icd-loader')
conflicts=('libcl')
replaces=('libcl')
optdepends=('opencl-driver: packaged opencl driver')
source=(https://forge.imag.fr/frs/download.php/$_pkgver/$pkgname-$pkgver.tar.gz)
md5sums=('32335dc7dd3ea2a4b994ca87f2f80554')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr
  make
}

# fail in i686
check() {
  cd "$srcdir/$pkgname-$pkgver"
  make -k check
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install

  install -m755 -d "$pkgdir/usr/share/licenses/ocl-icd"
  install -m644 "$srcdir/$pkgname-$pkgver/COPYING" "${pkgdir}/usr/share/licenses/ocl-icd/"
}

# vim:set ts=2 sw=2 et:
